﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page language="java" import="org.apache.shiro.subject.Subject" %>
<%@ page language="java" import="org.apache.shiro.SecurityUtils" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	//设置无缓存
	response.addHeader("Progma", "no-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
	response.setHeader("Pragma", "no-cache");
	response.setHeader("Cache-Control", "no-store");
	response.setHeader("Cache-Control", "must-revalidate");
%>
<!DOCTYPE html>
<html>
<head>
<title>首页</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/style.css" />
<script type="text/javascript" src="<%=basePath%>js/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery-ui-1.8.16.custom.min.js"></script>
<script type="text/javascript">
window.onscroll = function() {
	screenAdapter();
};
window.onresize = function() {
	screenAdapter();
};
$(document).ready(function(){
	screenAdapter();
});
function screenAdapter() {
	document.getElementById('navigator').style.height = document.documentElement.clientHeight - 150 + "px";
	document.getElementById('main').style.height = document.documentElement.clientHeight - 150 + "px";
}
</script>
</head>
<body>
	<div id="wrapper">
		<div id="header">
			<div id="logo"></div>
			<table style="border:1px">
				<tr style="height:38px;">
					<td></td>
					<td><!-- <br />时间 --></td>
				</tr>
				<tr style="height:50px;">
					<td width="450px" align="center" 
						style="vertical-align:middle;font-size:32px;align:left;text-shadow:Red;font-family:'黑体';">合肥学院项目申报系统</td>
					<td>
						<%-- <img src="<%=basePath%>images/sdnum_1.jpg"> --%>
						
						<%-- <a href="http://www.sunda.zj.cn/" style="cursor:pointer" target="blank"><img src="<%=basePath%>images/sdnum_1.jpg"></a>
						<a href="<%=basePath%>common/seehelp.do" style="cursor:pointer" target="MainFrame"><img src="<%=basePath%>images/sdnum_2.jpg"></a>
						<a href="<%=basePath%>common/contactus.do" style="cursor:pointer" target="MainFrame"><img src="<%=basePath%>images/sdnum_3.jpg"></a>
						<a href="<%=basePath%>system/outlogin.do" style="cursor:pointer"><img src="<%=basePath%>images/sdnum_4.jpg"></a>   	 --%>
					</td>
				</tr>
			</table>
		</div>


		</div>
		<div id="navigator">
			<iframe src="<%=basePath%>system/gotomenus.do"></iframe>
		</div>

		<div id="main">
			<%
			Subject subject = SecurityUtils.getSubject();
			String contextPath=request.getContextPath();
			// 36教务处 8 系统管理员 院领导
			if(subject.hasRole("8") ||subject.hasRole("42") ){
				out.print("<iframe name='MainFrame' src='"+contextPath+"/project/gotojiaowuchushowallapply.do' ></iframe>");
			}
			//38 项目申报人 
			else if(subject.hasRole("44")){
				// 只可以查看自己的
				out.print("<iframe name='MainFrame' src='"+contextPath+"/project/gotoshowallapply.do' ></iframe>");
			}
			else if(subject.hasRole("43")){  //系部主任 系部管理员
				//可以查看本系的
				out.print("<iframe name='MainFrame' src='"+contextPath+"/project/gotoxibushowallapply.do' ></iframe>");
			}
			else if(subject.hasRole("45")){ //专家
				//可以查看本系的
				out.print("<iframe name='MainFrame' src='"+contextPath+"/project/gotoexpertpingshen.do' ></iframe>");
			}
			else if(subject.hasRole("46")){
				out.print("<iframe name='MainFrame' src='"+contextPath+"/project/gotoxibuadminshowallapply.do' ></iframe>");
			}
			 %>
			<%-- <iframe name="MainFrame" src="<%=basePath%>monitor/intomapmonitor.do" ></iframe> --%>
		</div>

		<div id="footer">
			<p align="left">
			用户名：${user.username }
			</p>
		</div>
	</div>
</body>
</html>